home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / fortran / f2c-stab.9 / f2c-stab / f2c-stabs / make-test-routines < prev    next >
Encoding:
Text File  |  1996-03-31  |  1.8 KB  |  51 lines

  1. #!/usr/local/bin/snow -f
  2.  
  3. ;; Copyright (c) 1996 Harvey J. Stein <abel@netvision.net.il>, and
  4. ;; eventually <hjstein@netvision.net.il>
  5. ;; All Rights Reserved.
  6. ;; 
  7. ;; This package is covered by the GNU GPL.  You can freely use and
  8. ;; distribute it as long as it stays under the GNU GPL, and as long as
  9. ;; you distribute all the corresponding source code, and as long as this
  10. ;; message and the above copyright notice remains.
  11.  
  12. (cond ((< *argc* 1)
  13.        (format #t "~a" "
  14. Usage:      make-test-routines <si-info-files>
  15.  
  16. Reads each si-info file and writes out readers, writers, and drivers
  17. for each subroutine and function declared in each file.  si-info files
  18. can  be created by fts-f2si.  This routine is known to have the
  19. following faults when used on raw fts-f2si output:
  20.  
  21.    -Use of * in array declarations.
  22.       You'll need replace asterisks in pff calls with the correct
  23.       array length.
  24.    -Character strings in general.
  25.       You'll see calls to pff_unknown_guy.  One can use pff_wrstr for
  26.       writing, but there's no dual for reading.  You'll have to decide
  27.       whether to use unmatched readers and writers or to skip the
  28.       strings.
  29.    -Multiple dimension arrays.
  30.       You'll see calls to pff_unknown_guy - You'll have to fix up the
  31.       calls.  It might also screw up the argument list.
  32.    -Cases where the array size comes after the array in the argument
  33.     list.
  34.       You'll need to rearrange the order of the pff calls.
  35.  
  36. Some of these can be corrected by modifying the original fortran code
  37. or editing the .si file.
  38. \n")
  39.        (exit 1)))
  40.  
  41.  
  42. (require "si-lib")
  43.  
  44. (for-each (lambda (fnam)
  45.         (with-input-from-file fnam
  46.           (lambda () (let loop ((si-decl (read)))
  47.                (unless (eof-object? si-decl)
  48.                    (make-reader-and-writer si-decl)
  49.                    (loop (read)))))))
  50.       *argv*)
  51.